import axios from "../utils/request";

const getAddress = () => {
	return axios.get("/api/address");
};

const addAddress = body => {
	return axios.post("/api/address", body);
};

const editAddress = body => {
	return axios.post("/api/address/edit", body);
};

const deleteAddress = id => {
	return axios.get("/api/address/delete/" + id);
};
export default {
	install(Vue) {
		Vue.prototype.$api = {
			getAddress,
			addAddress,
			editAddress,
			deleteAddress,
		};
	},
};
